//
//  LcbReachability.h
//  Lcb
//
//  Created by lcb on 16/6/14.
//  Copyright © 2016年 lcb. All rights reserved.
//


#import <Foundation/Foundation.h>


typedef enum : NSInteger {
    LcbNotReachable = 0,
    LcbReachableViaWiFi,
    LcbReachableViaWWAN
} LcbNetworkStatus;

#pragma mark IPv6 Support
//Reachability fully support IPv6.  For full details, see ReadMe.md.


extern NSString *kLcbReachabilityChangedNotification;


@interface LcbReachability : NSObject

/*!
 * Use to check the reachability of a given host name.
 */
+ (instancetype)reachabilityWithHostName:(NSString *)hostName;

/*!
 * Checks whether the default route is available. Should be used by applications that do not connect to a particular host.
 */
+ (instancetype)reachabilityForInternetConnection;

/*!
 * Start listening for reachability notifications on the current run loop.
 */
- (BOOL)startNotifier;
- (void)stopNotifier;

- (LcbNetworkStatus)currentReachabilityStatus;

/*!
 * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN on Demand.
 */
- (BOOL)connectionRequired;

/*!
 * whether the default route is available
 */
+ (BOOL)reachability:(NSString*)host;

@end
